<?php
require_once 'lib/Jenis.php';
include_once "config/config.php";
$config=new config();
$config->connect();

if (isset ($_GET["kd_jenis_sk"])){
	
	$jenis = new Jenis();
	$jenis->setId($_GET["kd_jenis_sk"]);
	$daftar_jenis = new Daftar_jenis();
			
			
			if($daftar_jenis->delete($jenis)==true){
				echo "<script>
						alert('Informasi: Data berhasil dihapus.');
						window.location.href='jenis_surat_keluar.php';
					</script>";
			} else {
					
				echo "<script>
						alert('Informasi: Data gagal dihapus.');
						window.location.href='jenis_surat_keluar.php';
					</script>";
			}
		
} else {
	header("Location:jenis_surat_keluar.php");
}